package com.weixue.service;

import com.weixue.controller.vo.NongFuMallOrderDetailVO;
import com.weixue.controller.vo.NongFuMallOrderItemVO;
import com.weixue.controller.vo.NongFuMallShoppingCartItemVO;
import com.weixue.controller.vo.NongFuMallUserVO;
import com.weixue.entity.NongFuMallOrder;
import com.weixue.utils.PageQueryUtil;
import com.weixue.utils.PageResult;

import java.util.List;

public interface NongFuMallOrderService {
    /**
     * 后台分页
     */
    PageResult getNongFuMallOrdersPage(PageQueryUtil pageUtil);

    /**
     * 订单信息修改
     */
    String updateOrderInfo(NongFuMallOrder nongFuMallOrder);

    /**
     * 配货
     */
    String checkDone(Long[] ids);

    /**
     * 出库
     */
    String checkOut(Long[] ids);

    /**
     * 关闭订单
     */
    String closeOrder(Long[] ids);

    /**
     * 保存订单
     */
    String saveOrder(NongFuMallUserVO user, List<NongFuMallShoppingCartItemVO> myShoppingCartItems);

    /**
     * 获取订单详情
     */
    NongFuMallOrderDetailVO getOrderDetailByOrderNo(String orderNo, Long userId);

    /**
     * 获取订单详情
     */
    NongFuMallOrder getNongFuMallOrderByOrderNo(String orderNo);

    /**
     * 我的订单列表
     */
    PageResult getMyOrders(PageQueryUtil pageUtil);

    /**
     * 手动取消订单
     */
    String cancelOrder(String orderNo, Long userId);

    /**
     * 确认收货
     */
    String finishOrder(String orderNo, Long userId);

    String paySuccess(String orderNo, int payType);

    List<NongFuMallOrderItemVO> getOrderItems(Long id);
}
